package com.demo.rydemo.result;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ry
 * @Description
 * @Date 2020/8/10 16:05
 */
@RestController
public class LoginController  extends  CoreController{

    @Autowired
    AjaxResult ajaxResult;

    @RequestMapping("/loginSuccess")
    public AjaxResult loginSuccess(){
        return ajaxResult.success("登录成功");
    }

    @RequestMapping("/unauthorized")
    public AjaxResult loginError(){
        return ajaxResult.error("访问失败，未登录");
    }
}
